<?php 
include_once '../manage_db/db_connect.php';
include_once '../manage_tags/auto_generate_tags.php';
$con = db_connect();
session_start();
$username = $_SESSION['username'];

$birthday = $_POST['birthday'];
$age = $_POST['age'];
$gender = $_POST['gender'];	
$interest1 = $_POST['interest1'];
$interest2 = $_POST['interest2'];
$interest3 = $_POST['interest3'];

$insert = "UPDATE `RashidStone`.`UserProfile`
	SET birthday = '$birthday',
	age = '$age',
	gender = '$gender',
	interest1 = '$interest1',
	interest2 = '$interest2',
	interest3 = '$interest3'
	WHERE username='$username';";
$result = mysql_query($insert);

auto_generate_edit_profile();

if($_SESSION['isAdmin']){
	header("Location: ../admin_dashboard.php");
} else {
	header("Location: ../user_dashboard.php");
}
;?>